const app = getApp()
import util from '../../../utils/util'
import {
  GerGrderTree
} from '../../../config/api'

Page({

  /**
   * 页面的初始数据
   */
  data: {
    id:'',
    grid_name:'',
    infos:'',
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    console.log(options)
    this.setData({
      id: options.id,
      grid_name: options.grid_name
    })

    this.getInfos();
  },

  getInfos(){
    let that = this;
    let params = {
      vollege_id:app.globalData.vollege_id,
      grid: this.data.id
    }
    util.apiRequest(GerGrderTree, params,null).then(r => {
      console.log('信息66：',r)
      that.setData({
        infos:r.data.data
      })
    })
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})